Bit rate controller and a method for limiting output bit rate

ABSTRACT

The present invention relates to a bit rate controller comprising: a light determination block configured to determine a light level in images of a captured scene; and a maximum bit rate setting block. The maximum bit rate setting block is configured to: upon the light level being determined to be a low light level, set a low-light maximum bit rate; upon the light level being determined to be an intermediate light level, set an intermediate-light maximum bit rate; or upon the light level being determined to be a high light level, set a high-light maximum bit rate. The low-light maximum bit rate is lower than the intermediate-light maximum bit rate. The high-light maximum bit rate is lower than the intermediate-light maximum bit rate.

RELATED APPLICATION

This application claims priority under 35 U.S.C. § 119 based on EuropeanPatent Application No. 15200115.2, filed Dec. 15, 2015, the disclosureof which is hereby incorporated by reference herein.

TECHNICAL FIELD

The present invention relates to limiting of output bit rate.

BACKGROUND

When sending digital video data, compression of the digital video datais used for reducing the bit rate of the digital video data.

The bit rate may be controlled by setting a predetermined constant bitrate. This will result in that parts of the digital video data where thedegree of detail and/or motion in the captured scene is relatively lowwill risk being compressed in an unnecessarily small degree, resultingin that the compressed digital video data is taking up unnecessarilyhigh amounts of bandwidth and/or storage space. Moreover, this will alsoresult in that parts of the digital video data where the degree ofdetail and/or motion in the captured scene is relatively high will riskbeing compressed in a too large degree, resulting in that the imagequality of the compressed digital video data is compromised.

Alternatively, the bit rate may be controlled by setting a maximum bitrate used for keeping the bit rate close to or below the predeterminedmaximum. The predetermined maximum is implemented as a fixed parameterin a bit rate controller. A relatively high predetermined maximum bitrate may require a large bandwidth and/or storage for the digital videodata, whereas a relatively low predetermined maximum bit rate will riskcompromising the image quality of the digital video data when there is alot of detail or motion in the captured scene.

Yet alternatively, the bit rate controller may employ variable bit rate,which may also be referred to as constant quality, where the bit rate isallowed to vary in order to maintain a certain image quality. This maylead to a too high usage of bandwidth when there is a lot of detail ormotion in the scene. Moreover, this may lead to a very high bit rate atlow light conditions capturing the digital video data. A high gain onthe signal from the image sensor will be needed for capturing thedigital video data in low light conditions. This will result in a lot ofnoise in the digital video data, which requires large amounts of bitsfor encoding.

SUMMARY OF THE INVENTION

It is an object of the present invention to solve at least one of theproblems mentioned above.

According to a first aspect a method for setting bit rate is provided.The method comprises: determining a light level in images of a capturedscene, wherein a light level scale is discretized into a plurality ofdistinct light levels comprising at least a low light level, anintermediate light level and a high light level, and wherein a maximumbit rate is associated with each respective distinct light level; uponthe light level being determined to be the low light level, setting alow-light maximum bit rate; upon the light level being determined to bethe intermediate light level, setting an intermediate-light maximum bitrate; or upon the light level being determined to be the high lightlevel, setting a high-light maximum bit rate; wherein the low-lightmaximum bit rate is lower than the intermediate-light maximum bit rateand wherein the high-light maximum bit rate is lower than theintermediate-light maximum bit rate.

According to the present invention, a variable maximum bit rate is used,which is dependent on the light level in an image of the digital videodata that is to be encoded. In this manner, the maximum bit rate may beset such that a smaller portion of a constant quality bit rate isallowed at intermediate light levels, e.g., dusk or dawn, and a largerportion of the constant quality bit rate is allowed in “completedarkness”, and particularly at high light levels. In an intermediatelight situation, there will be a lot of noise, leading to high bit ratesif a constant quality bit rate is used. If the maximum bit rate is settoo low in such a situation, the quality of the images will be low andactual movement in the scene may risk being interpreted as noise.However, if the maximum bit rate is set higher, in order to allow ahigher quality of the noisy images, the limit may be unnecessarily highfor an essentially “completely dark” scene. For an essentially“completely dark” scene, a lot of the pixels will be clipped to black,meaning that there is little variation and noise. Images of such a scenemay therefore not need severe compression for fitting within the bitrate limit. Still, high quality in an essentially “completely dark”image is of little use to the viewer, so the bits are not that wiselyspent. For storage, that is important all in itself. For transmission itmay, e.g., be significant if there are also other units sending digitalvideo data, e.g. video cameras, in a system of units arranged to senddigital video data, which might at the same time benefit more from ahigher bit rate limit.

A light level scale may be discretized into a plurality of distinctlight levels, wherein a maximum bit rate is associated with eachrespective distinct light level. The difference in light level betweentwo adjacent distinct light levels may be at most a doubling of thelight level.

The light level in the images may at least partly be determined by usingimage sensor data of an image sensor capturing the images or a dedicatedlight level sensor. The word “light level” should be construed as theamount of light measured in a plane, typically the plane of the imagesensor capturing the images. Another word used for light level isilluminance. The light level may be measured directly, using thededicated sensor, or indirectly, using image sensor data. The latter maybe implemented by having a look-up table translating a gain setting ofthe image sensor used for capturing the images into a light level.

Upon the light level being determined to be the low light level, a firstlow-light maximum bit rate may be set for parts of an image identifiedas foreground and a second low-light maximum bit rate may be set forparts of the image identified as background; upon the light level beingdetermined to be the intermediate light level, a firstintermediate-light maximum bit rate may be set for parts of the imageidentified as foreground and a second intermediate-light maximum bitrate may be set for parts of the image identified as background; or uponthe light level being determined to be a high light level, a firsthigh-light maximum bit rate may be set for parts of the image identifiedas foreground and a second high-light maximum bit rate may be set forparts of the image identified as background; wherein the first low-lightmaximum bit rate is lower than the first intermediate-light maximum bitrate and wherein the first high-light maximum bit rate is lower than thefirst intermediate-light maximum bit rate. In this manner,differentiated maximum bit rates may be set for the foreground and thebackground of the image. For instance, fewer bits may be spent on thebackground, which might be of less importance for a viewer, and morebits may be spent on the foreground, such that moving objects or peoplemay be depicted more clearly.

The second low-light maximum bit rate may be lower than the secondintermediate-light maximum bit rate and the second high-light maximumbit rate may be lower than the second intermediate-light maximum bitrate. Alternatively, the second low-light maximum bit rate, the secondintermediate-light maximum bit rate and the second high-light maximumbit rate may be set to be the same maximum bit rate.

According to a second aspect a non-transitory computer-readablerecording medium is provided, having recorded thereon a program forimplementing any of the above methods when executed on a device havingprocessing capabilities.

According to a third aspect a bit rate controller is provided. The bitrate controller comprises: a light determination block configured todetermine a light level in images of a captured scene; and a maximum bitrate setting block. The light determination block is configured todetermine the light level in images of the captured scene based on lightlevel during capturing of the images, wherein a light level scale isdiscretized into a plurality of distinct light levels comprising atleast a low light level, an intermediate light level and a high lightlevel, and wherein a maximum bit rate is associated with each respectivedistinct light level. The maximum bit rate setting block is configuredto: upon the light level being determined to be a low light level, setthe low-light maximum bit rate; upon the light level being determined tobe the intermediate light level, set an intermediate-light maximum bitrate; or upon the light level being determined to be the high lightlevel, set a high-light maximum bit rate. Wherein the low-light maximumbit rate is lower than the intermediate-light maximum bit rate andwherein the high-light maximum bit rate is lower than theintermediate-light maximum bit rate.

The rate controller may further comprise a memory comprising a look-uptable comprising the respective distinct light levels and the theretoassociated predetermined maximum bit rates. The setting of therespective maximum bit rate may be performed by performing a look-up inthe look-up table.

The bit rate controller may be arranged in a digital video camera.

The bit rate controller may be configured to service a plurality ofdigital network cameras, each digital network camera being configured tocapture images depicting a camera specific scene, wherein the noisedetermination block is configured to camera specifically determine thelight level in the images of each camera specific scene, and wherein themaximum bit rate setting block is configured to set camera specificlow-light maximum bit rates, intermediate-light maximum bit rates andhigh-light maximum bit rates.

The bit rate controller may further be configured to change the cameraspecific low-light maximum bit rates, intermediate-light maximum bitrates and high-light maximum bit rates over time based on determinedactivity in the camera specific scenes. The change may be based ondetermined activity in the camera specific scenes. Alternatively or incombination, in a system of many cameras, the change may be based on bitrates of the encoded streams outputted by the different cameras.Thereby, a bit rate distribution in a system of cameras may be adaptedto the needs of the different cameras over time.

The above mentioned features of the method, when applicable, apply tothis third aspect as well. In order to avoid undue repetition, referenceis made to the above.

A further scope of applicability of the present invention will becomeapparent from the detailed description given below. However, it shouldbe understood that the detailed description and specific examples, whileindicating preferred embodiments of the invention, are given by way ofillustration only, since various changes and modifications within thescope of the invention will become apparent to those skilled in the artfrom this detailed description.

Hence, it is to be understood that this invention is not limited to theparticular component parts of the device described or steps of themethods described as such device and method may vary. It is also to beunderstood that the terminology used herein is for purpose of describingparticular embodiments only, and is not intended to be limiting. It mustbe noted that, as used in the specification and the appended claims, thearticles “a,” “an,” “the,” and “said” are intended to mean that thereare one or more of the elements unless the context clearly dictatesotherwise. Thus, for example, reference to “a unit” or “the unit” mayinclude several devices, and the like. Furthermore, the words“comprising”, “including”, “containing” and similar wordings do notexclude other elements or steps.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will now bedescribed in more detail, with reference to appended drawings showingembodiments of the invention. The figures should not be consideredlimiting the invention to the specific embodiment; instead they are usedfor explaining and understanding the invention.

As illustrated in the figures, the sizes of layers and regions may beexaggerated for illustrative purposes and, thus, are provided toillustrate the general structures of embodiments of the presentinvention. Like reference numerals refer to like elements throughout.

FIG. 1 schematically illustrates a digital network camera arranged tocapture digital video data depicting a scene.

FIG. 2 schematically illustrates a bit rate controller arranged to limitoutput bit rate.

FIG. 3 illustrates a system of a plurality of digital network camerasconnected to a bit rate controller.

FIG. 4 is a block scheme of a method for limiting output bit rate.

DETAILED DESCRIPTION

The present invention will now be described more fully hereinafter withreference to the accompanying drawings, in which currently preferredembodiments of the invention are shown. This invention may, however, beembodied in many different forms and should not be construed as limitedto the embodiments set forth herein; rather, these embodiments areprovided for thoroughness and completeness, and to fully convey thescope of the invention to the skilled person.

FIG. 1 illustrates a digital network camera 100 arranged to capturedigital video data depicting a scene. The digital network camera 100 isarranged to capture and process (and possibly also store) the digitalvideo data. The digital network camera 100 comprises a housing 112, alens 114, an image sensor 116, an image processing unit 118, a bit ratecontroller 120, an encoding unit 122, a memory 124, a CPU 126 and annetwork interface 128. Any one of the image processing unit 118, therate controller 120 and/or encoding unit 122 may be implemented ashardware and/or software.

The digital network camera 100 is arranged to be connected to a digitalnetwork such as the Internet or a Local Area Network (LAN) via thenetwork interface 128. The connection to the digital network may bewired or wireless. Thus, the network interface 128 may be a network portadapted to 10/100/1000 Mbps data traffic, such as an Ethernet port, amodular port being arranged to receive a modular connector, e.g., a RJ45connector. Normally, such a RJ45 connector port is arranged to receive anetwork cable, such as a twisted pair cable (e.g., of cat 5, cat 5e orcat 6). Alternatively, the I/O means of the network port may be awireless I/O means using mobile internet communication standards (e.g.,1G, 2G, 2.5G, 2.75G, 3G, 3.5G, 3.75G, 3.9G, 4G, 5G) or using WiFi.

The camera components, i.e. the lens 114 and the image sensor 116, maybe arranged to capture raw images wherein each raw image can bedescribed as light of different wavelengths and originating fromdifferent objects and parts of objects. These raw images are thenconverted from analog to digital format and transferred into the imageprocessing unit 118. According to this embodiment the digital networkcamera 110 is a camera arranged to capture photographic images.

Alternatively or in combination, the image sensor 116 of the digitalnetwork camera 110 may be arranged to capture thermal images.

Hence, the digital video data captured by the digital network camera 110may be a representation of photographic images, a representation ofthermal images or a combination thereof.

The encoding unit 122 is arranged to encode the digital video data usingvideo encoding. Non-limiting examples of video encoding are videoencoding standards of the ISO/MPEG or ITU-H.26X families. The encodingunit 122 is arranged to encode images of the captured digital video datainto images in an encoded version of the captured digital video data,henceforth referred to as the encoded digital video data.

The encoded digital video data may be directly transmitted over adigital network via the network interface 128. Alternatively, theencoded digital video data may be stored in the memory 124 for latertransmission, via the network interface 128, over the digital network.The memory 124 may be any kind of volatile or non-volatile memory.Further, the memory 124 may comprise a plurality of memory members. Atleast one of the plurality of memory members may be used as a buffermemory.

In order to limit the amount of data of the encoded digital video datathe bit rate of the encoded digital video data is controlled by means ofthe bit rate controller 120. Examples of bit rate controlling methodsare using a constant bit rate, a maximum bit rate or a variable(constant quality) bit rate. Using maximum bit rate, a predefined limitis used for keeping the bit rate close to or below a certainpredetermined threshold. The limit is implemented as a fixed parameterto the bit rate controller 120. A high limit will require largebandwidth and/or storage, whereas a low limit will risk compromisingimage quality when there is a lot of detail or motion in the capturedscene. Using variable bit rate, sometimes referred to as constantquality bit rate, the bit rate controller 120 is arranged to vary thebit rate such that a certain image quality is maintained. This may leadto a too high usage of bandwidth when there is a lot of detail or motionin the scene. Moreover, this may lead to a very high bit rate atintermediate light conditions (wherein intermediate light conditions,e.g., correspond to dusk or dawn), or at intermediate thermal radiationconditions in the case of thermal imaging. A high gain on the signalfrom the image sensor 116 will be needed for capturing the digital videodata at intermediate light conditions, or at intermediate thermalconditions. This will result in a lot of noise in comparison with thereal signal in the digital video data, i.e. a low signal-to-noise ratio(SNR), which requires large amounts of bits for encoding. For example,using variable bit rate, the highest bitrates will be produced duringintermediate light conditions. When it is really dark, low light levelconditions, a lot of the image content will be clipped to black, butwhen the light level is slightly higher (intermediate light levels),noise and details will raise the output bit rate significantly.

Hence, the relative noise level in the digital video data rises whenthere is intermediate light level or intermediate heat radiation in thescene; this because a high gain on the image sensor 116 is needed forcapturing the scene, and details that would have been clipped to blackat a lower light level or heat radiation start appearing.

According to the present invention, a variable maximum bit rate is used,which is dependent on the light level in an image of the digital videodata that is to be encoded. For photographic images the noise is low atlow light levels and noise increases with increasing light level. As thelight level thereafter continues to rise, the need for gain decreases,and thereby the noise also decreases. Hence, the amount of data toencode is not directly proportional to the light level, as some detailscan be clipped to black if the signal is below certain thresholds.Similarly, for thermal images at low heat radiation levels the amount ofnoise is low because of clipping, and noise increases with increasingheat radiation level. As the heat radiation level thereafter continuesto rise, the need for gain decreases, and thereby the noise alsodecreases.

The bit rate controller 120 is arranged to control the bit rate of theencoded digital video data. The bit rate controller 120 may be hardwareimplemented, software implemented or a combination thereof. In FIG. 2 anembodiment of a bit rate controller 120 is illustrated. The bit ratecontroller 120 comprises a light determination block 202 and a maximumbit rate setting block 204.

The light determination block 202 is arranged to determine a light levelin images captured by the digital network camera 110. The noisedetermination block 202 may be arranged to determine the light level byusing image sensor data or a dedicated light level sensor 130 of thedigital network camera 110. The former may be implemented by having alook-up table translating intensities measured by the pixels of theimage sensor 116, e.g., luminance data after translation to a YCbCrcolour space, into light levels. The light level may also be indirectlydetermined in that the light levels may be related to the number of gainsteps from maximum gain. Intermediate light may be less than 4 gainsteps from maximum gain. High light may be less gain than 8 gain stepsfrom no gain. It shall be noted that gain steps are defined by thehardware amplifier and can be a few or many The dedicated light levelsensor 130 is arranged to measure incoming photons, just like the imagesensor 116, but typically the dedicated light level sensor 130 has awider specially designed lens. The wider specially designed lens may,e.g., be arranged to capture the amount of light in a whole room. Thereadout data from the dedicated light level sensor 130 may then betranslated into light levels using a look-up table. Normally, such alook-up table is non-linear. The dedicated light level sensor 130 istypically arranged to indicate a suitable ISO value. A look-up table maythen be used for determining which gain value corresponds to theindicated ISO value for the specific image sensor. Alternatively or incombination, the light determination block 202 may be arranged todetermine the light level in the images by measuring or estimating noisein the signal provided by the image sensor 116. The noise in the signalprovided by the image sensor 116 after it has been digitized comprisesboth fixed and dynamic noise. Fixed noise may be filtered away by meansof a noise filter. However, it may be beneficial to measure the noisebefore noise filtering. If the noise is high, objects entering the scenemay be mistaken for noise. The risk of mistaking objects for noise isreduced if the noise is measured before filtering.

Similarly, in case of thermal imaging the light determination block 202may be arranged to determine the heat radiation level in the images byusing image sensor data or a dedicated heat radiation sensor and/or bymeasuring or estimating noise in the signal provided by the image sensor116.

Depending on the light level determined by the light determination block202 the maximum bit rate setting block 204 is configured to setdifferent maximum bit rates. A light level scale is discretized into aplurality of distinct light levels. A predetermined maximum bit rate isassociated with each respective distinct light level. The distinct lightlevels are categorized into at least a low, an intermediate and a highlight level. Upon the light level being determined to be a low lightlevel, the maximum bit rate is set to a low-light maximum bit rate. Uponthe light level being determined to be an intermediate light level, themaximum bit rate is set to an intermediate-light maximum bit rate. Uponthe light level being determined to be a high light level, the maximumbit rate is set to a high-light maximum bit rate. The low-light maximumbit rate is lower than the intermediate-light maximum bit rate. Thehigh-light maximum bit rate is lower than the intermediate-light maximumbit rate.

Similarly, in case of thermal imaging the maximum bit rate setting block204 is configured to set different maximum bit rates depending on theheat radiation level. A heat radiation level scale is discretized into aplurality of distinct heat radiation levels. A predetermined maximum bitrate is associated with each respective distinct heat radiation level.The distinct heat radiation levels are categorized into at least a low,an intermediate and a high heat radiation level. Upon the heat radiationlevel being determined to be a low heat radiation level, the maximum bitrate is set to a low heat radiation maximum bit rate. Upon the heatradiation level being determined to be an intermediate heat radiationlevel, the maximum bit rate is set to an intermediate heat radiationmaximum bit rate. Upon the heat radiation level being determined to be ahigh heat radiation level, the maximum bit rate is set to a high heatradiation maximum bit rate. The low heat radiation maximum bit rate islower than the intermediate heat radiation maximum bit rate. The highheat radiation maximum bit rate is lower than the intermediate heatradiation maximum bit rate.

The digital network camera 110 may also comprise a region of interestdetermining unit 132. The region of interest determining unit 132 isarranged to identify a foreground part in the images of the digitalvideo data as containing relevant information and to identify abackground part of the images of the digital video data as containingnon-relevant information. Non-limiting examples of foreground parts areparts comprising motion or parts comprising objects of specificinterest, e.g., a face, a car, a license plate. For example, anintelligent compression scheme, such as AXIS Zipstream, may be used forindentifying foreground and background parts.

Hence, upon the light level being determined to be a low light level, afirst low-light maximum bit rate may be set for parts of an imageidentified as foreground and a second low-light maximum bit rate is setfor parts of the image identified as background. Upon the light levelbeing determined to be an intermediate light level, a firstintermediate-light maximum bit rate may be set for parts of an imageidentified as foreground and a second intermediate-light maximum bitrate is set for parts of the image identified as background. Upon thelight level being determined to be a high light level, a firsthigh-light maximum bit rate may be set for parts of an image identifiedas foreground and a second high-light maximum bit rate is set for partsof the image identified as background. The first low-light maximum bitrate is lower than the first intermediate-light maximum bit rate. Thefirst high-light maximum bit rate is lower than the firstintermediate-light maximum bit rate. The second low-light maximum bitrate may be lower than the second intermediate-light maximum bit rate.The second high-light maximum bit rate may be lower than the secondintermediate-light maximum bit rate. Alternatively, the second low-lightmaximum bit rate, the second intermediate-light maximum bit rate and thesecond high-light maximum bit rate are set to be the same maximum bitrate, i.e. the same maximum bit rate is set for the backgroundregardless of light level.

Accordingly, different bit rates may be used for parts identified asbackground and as foreground. For instance, a constant maximum bit ratemay be used for the background, and a variation of the maximum bit rateas a function of the light level may be used for the foreground.Alternatively, varying maximum bit rates as a function of the lightlevel may be used for the background as well as for the foreground,however, the maximum bit rates as a function of the light level aredifferent for the background as compared with the foreground.

Division of the scene into foreground and background may also be made inmore steps. Moreover, one maximum bit rate could be set for theforeground and another maximum bit rate for the background, and asmoothing function may be used at the borders there between in order toavoid sharp quality transitions in the images.

What is said above for foreground and background of the scene inphotographic images may also be implemented in connection with thermalimaging. For thermal imaging it is the heat radiation level and itsdiscretization into low, intermediate and high levels that is usedinstead of the light level.

The bit rate controller 120 may further comprise a memory 206. Thememory 206 may be a dedicated memory for the bit rate controller 120.Alternatively or in combination, the memory may be the memory 124 of thedigital network camera 110. The memory 206 may comprise a look-up tablecomprising predetermined maximum bit rates and thereto associatedrespective distinct light or heat radiation levels. Hence, the settingof the respective maximum bit rate may be performed by performing alook-up in the look-up table. The difference in light or heat radiationlevel between two adjacent distinct light or heat radiation levels maybe at most a doubling of the light or heat radiation level. In case adetermined light or heat radiation level does not correspond to adistinct light or heat radiation level of the distinct light or heatradiation levels in the look-up table, the distinct light or heatradiation level closest to the determined light or heat radiation levelmay be used for finding the predetermined maximum bit rate.Alternatively, an interpolation using values of the look-up table may beused for finding a maximum bit rate.

The digital network camera 110 may also comprise a temperaturedetermining unit 134. The temperature determining unit 134 is arrangedto determine a temperature of the image sensor 116 capturing the images.The temperature determining unit 134 may comprise a temperature sensorconfigured to measure the temperature of the image sensor 116 on or nextto the image sensor 116. Hence, the temperature determining unit 134 maybe arranged to directly measure the temperature of the image sensor 116.Alternatively, the temperature determining unit 134 may comprise atemperature sensor arranged at the housing 112 of the digital networkcamera 110. The temperature sensor at the housing 112 of the digitalnetwork camera 110 may be configured to measure an interior temperatureof the digital network camera 110 and/or an ambient temperature outsidethe digital network camera 110. The interior temperature and/or theambient temperature may then be used by the temperature determining unit134 for estimating the temperature of the image sensor 116. Thedetermined temperature of the image sensor 116 is indicative of heatinduced noise at the image sensor 116. The temperature of the imagesensor 116 may be used for determining the noise level in images of acaptured scene. The noise level may in this case be caused by thetemperature of the image sensor 116 in combination with the light levelor the heat radiation level within the scene. Thus, the setting of therespective maximum bit rate may also be based on the temperature of theimage sensor when capturing the image.

FIG. 3 illustrates a system 300 of a plurality of digital networkcameras 350 connected to a bit rate controller 120. Each digital networkcamera 350 is configured to capture images depicting a camera specificscene. The plurality of digital network cameras 350 and the bit ratecontroller 120 are connected to each other in a computer network. Thebit rate controller 120 may be arranged as a specific device asillustrated in FIG. 3. Alternatively, the bit rate controller 120 may bearranged in one of the plurality of digital network cameras 350. The bitrate controller 120 is configured to service the plurality of digitalvideo cameras 350. The noise determination block 202 is configured tocamera specifically determine the light level in the images of eachcamera specific scene. A camera specific light level scale is set foreach specific camera. Each camera specific light level scale isdiscretized into a plurality of distinct camera specific light levels. Acamera specific predetermined maximum bit rate is associated with eachrespective camera specific distinct light level. The camera specificdistinct light levels are categorized into at least a low, anintermediate and a high light level. Hence, based on the cameraspecifically determined light levels in the images of each cameraspecific scene the maximum bit rate setting block 204 is configured toset camera specific low-light maximum bit rates, camera specificintermediate-light maximum bit rates and camera specific high-lightmaximum bit rates.

Alternatively, the system may be implemented having one camera-specificbit rate controller in each camera and then one system bit ratecontroller separately arranged, or arranged in one of the cameras.

The bit rate controller may further be configured to change the cameraspecific low-light maximum bit rates, the camera specificintermediate-light maximum bit rates and the camera specific high-lightmaximum bit rates over time. The change may be based on determinedactivity in the camera specific scenes. Alternatively or in combination,in a system of many cameras, the change may be based on bit rates of theencoded streams outputted by the different cameras. That is even ifthere is a maximum bit rate set at each camera, bit rate of theoutputted video stream may vary below that maximum bit rate. If onecamera is more often below its maximum bit rate and another camera ismore often on the maximum bit rate, bit allocation could be distributeddifferently among the cameras of the system of cameras.

The activity in each camera specific scene may, e.g., be determined by amotion detection algorithm. The motion detection algorithm may beperformed in motion detection software and/or hardware. The motiondetection software and/or hardware may be implemented in one or more ofthe plurality of digital network cameras 350. Alternatively or incombination, the motion detection software and/or hardware may beimplemented in the bit rate controller 120. The video motion detectionalgorithm is preferably based on spatio-temporal video analysis. Someexamples of video motion detection algorithms possible to use are:

An algorithm based on “change detection”. According to such algorithmsan image is compared with a previous image pixel-by-pixel in order tofind pixels changing between the image and the previous image.

An algorithm based on “motion detection”. According to such algorithmsan image is compared with a previous image filtering out “real” motionfrom for example illumination changes. This can for example be performedby applying spatio-temporal video analysis; Almbladh is for exampledescribing a method for spatio-temporal video analysis in U.S. Pat. No.8,121,424.

An algorithm based on “object motion detection” and “objectclassification”. According to such algorithms the detected motion isanalyzed to detect moving objects which are tracked so that objects thathave been in motion but are temporarily standing still are detected.Hence, according to such algorithms the objects may, e.g., be analyzedand classified as for example “human”, “vehicle”, “car”, “animal”,“face”, etc. In order to classify objects the method of Viola and Jonesdescribed in U.S. Pat. No. 7,099,510 may be used.

The different algorithms mentioned above typically build on each otherto step-wise achieve a higher degree of complexity and reliability.

Hence, the above described system 300 may e.g. be used for measuring,over a longer time (e.g., 24 hours or a week), the activity in thedifferent camera specific scenes and set the different camera specificmaximum bit rates depending on the activities. For instance, if there isoften activity in just one or a few camera specific scenes, the maximumbit rates for the corresponding digital network cameras 350 may beraised for those digital network cameras 350 in comparison with otherdigital network cameras 350 in the system 300.

What is discussed above in connection with camera specific light levelsand light level scales also apply for camera specific heat radiationlevels and heat radiation scales.

FIG. 4 illustrates a method for limiting output bit rate of a videoencoder. The method comprises the following acts. Determining, S402, alight level in images of a captured scene. Upon the light level beingdetermined to be a low light level, setting, S404 a, a low-light maximumbit rate. Upon the light level being determined to be an intermediatelight level, setting, S404 b, an intermediate-light maximum bit rate.Upon the light level being determined to be a high light level, setting,S404 c, a high-light maximum bit rate. The low-light maximum bit rate islower than the intermediate-light maximum bit rate. The high-lightmaximum bit rate is lower than the intermediate-light maximum bit rate.

The method may further comprise capturing, S400, digital video dataforming images depicting the scene. The capturing may preferably beperformed by the image sensor 116 of the digital video camera 110.Alternatively, the capturing of the digital video data forming imagesdepicting the scene may performed by an analog to digital converterconverting an analog signal into the digital video data.

The light level in the images may at least partly be determined by usingimage sensor data of the image sensor 116 or the dedicated light levelsensor 130. The noise level in the images may at least partly bedetermined by using a temperature of the image sensor 116. Hence, thenoise level in the images may be a function of the temperature of theimage sensor. Methods for determining the temperature of the imagesensor 116 are discussed above.

The person skilled in the art realizes that the present invention by nomeans is limited to the preferred embodiments described above. On thecontrary, many modifications and variations are possible within thescope of the appended claims.

For example, in most of the above mentioned exemplified embodiments thebit rate controller 120 is arranged in a digital video camera 110.However, it is realized that the bit rate controller 120 may be arrangedin other devices as well. As a non-limiting example, the bit ratecontroller 120 may be arranged in an analog to digital converterarranged to convert analog video into digital video data.

Moreover, different digital video cameras may give different noise atthe same light level, because of different day/night behavior. Somedigital video cameras switch to night mode (IR cut filter switched off)earlier than others. In night mode the images of the scene are typicallyset to be black and white. In day mode the images of the scene aretypically set to be in color, which leads to more noise at low lightlevels. Therefore, a digital video camera that switches to black andwhite at, e.g., 1.0 lux will give less noise at 0.95 lux than a camerathat does not switch to black and white until at 0.90 lux. In anembodiment, the bit rate controller may be arranged to influence theday/night behavior of the digital video camera, by slightly shifting theswitch between day and night modes. Care should be taken in order not toget an erratic behavior, quickly switching back and forth between dayand night modes. Such switching between day and night modes may beannoying to an operator viewing the video, and may also lead to aclicking noise when the IR cut filter is moved.

Additionally, variations to the disclosed embodiments can be understoodand effected by the skilled person in practicing the claimed invention,from a study of the drawings, the disclosure, and the appended claims.

The invention claimed is:
 1. A method for setting a bit rate forencoding of digital video data, the method comprising: determining alight level in photographic images of captured digital video datadepicting a scene, wherein a light level scale is discretized into aplurality of distinct light levels comprising at least a low lightlevel, an intermediate light level and a high light level, and wherein amaximum bit rate for encoding the digital video data is associated witheach respective distinct light level; upon the light level beingdetermined to be: the low light level, setting the bit rate for encodingthe digital video data to a low-light maximum bit rate; the intermediatelight level, setting the bit rate for encoding the digital video data toan intermediate-light maximum bit rate; or the high light level, settingthe bit rate for encoding the digital video data to a high-light maximumbit rate; wherein the low-light maximum bit rate is lower than theintermediate-light maximum bit rate and wherein the high-light maximumbit rate is lower than the intermediate-light maximum bit rate.
 2. Themethod of claim 1, wherein a difference in light level between twoadjacent distinct light levels is at most a doubling of the light level.3. The method of claim 2, wherein the light level in the images isdetermined by using image sensor data of an image sensor capturing theimages, or a dedicated light level sensor.
 4. The method of any one ofclaim 3 wherein upon the light level being determined to be: the lowlight level, a first low-light maximum bit rate is set for parts of animage identified as foreground and a second low-light maximum bit rateis set for parts of the image identified as background; the intermediatelight level, a first intermediate-light maximum bit rate is set forparts of an image identified as foreground and a secondintermediate-light maximum bit rate is set for parts of the imageidentified as background; or the high light level, a first high-lightmaximum bit rate is set for parts of an image identified as foregroundand a second high-light maximum bit rate is set for parts of the imageidentified as background; wherein the first low-light maximum bit rateis lower than the first intermediate-light maximum bit rate and whereinthe first high-light maximum bit rate is lower than the firstintermediate-light maximum bit rate.
 5. The method of claim 4, whereinthe second low-light maximum bit rate is lower than the secondintermediate-light maximum bit rate and wherein the second high-lightmaximum bit rate is lower than the second intermediate-light maximum bitrate, or wherein the second low-light maximum bit rate, the secondintermediate-light maximum bit rate and the second high-light maximumbit rate are set to be the same maximum bit rate.
 6. The method of anyone of claim 2, wherein upon the light level being determined to be: thelow light level, a first low-light maximum bit rate is set for parts ofan image identified as foreground and a second low-light maximum bitrate is set for parts of the image identified as background; theintermediate light level, a first intermediate-light maximum bit rate isset for parts of an image identified as foreground and a secondintermediate-light maximum bit rate is set for parts of the imageidentified as background; or the high light level, a first high-lightmaximum bit rate is set for parts of an image identified as foregroundand a second high-light maximum bit rate is set for parts of the imageidentified as background; wherein the first low-light maximum bit rateis lower than the first intermediate-light maximum bit rate and whereinthe first high-light maximum bit rate is lower than the firstintermediate-light maximum bit rate.
 7. The method of claim 6, whereinthe second low-light maximum bit rate is lower than the secondintermediate-light maximum bit rate and wherein the second high-lightmaximum bit rate is lower than the second intermediate-light maximum bitrate.
 8. The method of claim 6, wherein the second low-light maximum bitrate, the second intermediate-light maximum bit rate and the secondhigh-light maximum bit rate are set to be the same maximum bit rate. 9.The method of claim 1, wherein the light level in the images isdetermined by using image sensor data of an image sensor capturing theimages, or a dedicated light level sensor.
 10. The method of any one ofclaim 9, wherein upon the light level being determined to be: the lowlight level, a first low-light maximum bit rate is set for parts of animage identified as foreground and a second low-light maximum bit rateis set for parts of the image identified as background; the intermediatelight level, a first intermediate-light maximum bit rate is set forparts of an image identified as foreground and a secondintermediate-light maximum bit rate is set for parts of the imageidentified as background; or the high light level, a first high-lightmaximum bit rate is set for parts of an image identified as foregroundand a second high-light maximum bit rate is set for parts of the imageidentified as background; wherein the first low-light maximum bit rateis lower than the first intermediate-light maximum bit rate and whereinthe first high-light maximum bit rate is lower than the firstintermediate-light maximum bit rate.
 11. The method of claim 10, whereinthe second low-light maximum bit rate is lower than the secondintermediate-light maximum bit rate and wherein the second high-lightmaximum bit rate is lower than the second intermediate-light maximum bitrate, or wherein the second low-light maximum bit rate, the secondintermediate-light maximum bit rate and the second high-light maximumbit rate are set to be the same maximum bit rate.
 12. The method of anyone of claim 1, wherein upon the light level being determined to be: thelow light level, a first low-light maximum bit rate is set for parts ofan image identified as foreground and a second low-light maximum bitrate is set for parts of the image identified as background; theintermediate light level, a first intermediate-light maximum bit rate isset for parts of an image identified as foreground and a secondintermediate-light maximum bit rate is set for parts of the imageidentified as background; or the high light level, a first high-lightmaximum bit rate is set for parts of an image identified as foregroundand a second high-light maximum bit rate is set for parts of the imageidentified as background; wherein the first low-light maximum bit rateis lower than the first intermediate-light maximum bit rate and whereinthe first high-light maximum bit rate is lower than the firstintermediate-light maximum bit rate.
 13. The method of claim 12, whereinthe second low-light maximum bit rate is lower than the secondintermediate-light maximum bit rate and wherein the second high-lightmaximum bit rate is lower than the second intermediate-light maximum bitrate.
 14. The method of claim 12, wherein the second low-light maximumbit rate, the second intermediate-light maximum bit rate and the secondhigh-light maximum bit rate are set to be the same maximum bit rate. 15.A bit rate controller for controlling a bit rate for encoding of digitalvideo data, the bit rate controller comprising: a light leveldetermination block configured to determine a light level in images of acaptured scene based on light level during capturing of the images,wherein a light level scale is discretized into a plurality of distinctlight levels comprising at least a low light level, an intermediatelight level and a high light level, and wherein a maximum bit rate forencoding the digital video data is associated with each respectivedistinct light level; and a maximum bit rate setting block configuredto, upon the light level being determined to be: the low light level,set the bit rate for encoding the digital video to a low-light maximumbit rate; the intermediate light level, set the bit rate for encodingthe digital video to an intermediate-light maximum bit rate; or the highlight level, set the bit rate for encoding the digital video to ahigh-light maximum bit rate; wherein the low-light maximum bit rate islower than the intermediate-light maximum bit rate and wherein thehigh-light maximum bit rate is lower than the intermediate-light maximumbit rate.
 16. The bit rate controller according to claim 15, wherein thebit rate controller further comprises a memory comprising a look-uptable comprising distinct light levels and the thereto associatedrespective predetermined maximum bit rates; wherein the setting of therespective maximum bit rate is performed by performing a look-up in thelook-up table.
 17. The bit rate controller according to claim 16,wherein the difference in light level between two adjacent distinctlight levels is at most a doubling of the light level.
 18. The bit ratecontroller according to any one of claim 15, wherein the bit ratecontroller is arranged in a digital network camera.
 19. The bit ratecontroller according to any one of claim 15, wherein the bit ratecontroller is configured to service a plurality of digital networkcameras, each digital network camera being configured to capture imagesdepicting a camera specific scene, wherein the light level determinationblock is configured to camera specifically determine the light level inthe images of each camera specific scene, and wherein the maximum bitrate setting block is configured to set camera specific low-lightmaximum bit rates, intermediate-light maximum bit rates and high-lightmaximum bit rates.
 20. The bit rate controller according to claim 19,wherein the bit rate controller is further configured to change thecamera specific low-light maximum bit rates, intermediate-light maximumbit rates and high-light maximum bit rates over time.